home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / util / sys / InstallerNG.lha / InstallerNG / developer / include / libraries / installerngmodule.h < prev   
C/C++ Source or Header  |  2000-08-29  |  4KB  |  119 lines

  1.  
  2. #ifndef LIBRARIES_INSTALLERNGMODULE_H
  3. #define LIBRARIES_INSTALLERNGMODULE_H
  4.  
  5. /*
  6. **  $VER: installerngmodule.h 37.1 (29.08.2000)
  7. **  (C) by Jens Tröger
  8. **
  9. */
  10.  
  11. #include <exec/types.h>
  12. #include <exec/lists.h>
  13. #include <exec/nodes.h>
  14.  
  15. // the minimum free amount of stack space
  16. #define MINIMUM_FREE_STACKSPACE 8192
  17.  
  18. // this structure defines the environment for an arbitrary
  19. // program, before it gets executed
  20. struct ModuleEnvironment
  21. {
  22.   struct TreeNode *me_TreeRoot;
  23.   struct List     *me_Procedures;
  24.   struct List     *me_OnErrors;
  25.   struct List     *me_Effects;
  26.   struct List     *me_SymbolTable;
  27.   ULONG           *me_GlobalEnvironment;
  28.   APTR             me_UserData;
  29. };
  30.  
  31. // a node of the syntax tree can be anything; the value of
  32. // this node is placed in this union
  33. union TreeNodeValue
  34. {
  35.   int   tnv_FunID;
  36.   char *tnv_IdentName;
  37.   char *tnv_String;
  38.   long  tnv_Number;
  39. };
  40.  
  41. // the structure of one node of the syntax tree
  42. struct TreeNode
  43. {
  44.   struct Node         tn_Brothers;
  45.   struct TreeNode    *tn_Parent;
  46.   struct List         tn_Childs;
  47.   int                 tn_Type;
  48.   int                 tn_SrcLine;
  49.   int                 tn_SrcChar;
  50.   union TreeNodeValue tn_Value;
  51.   WORD                tn_MinNumArg;
  52.   WORD                tn_MaxNumArg;
  53.   APTR                tn_UserData;
  54. };
  55.  
  56. // the different node types (TreeNode->tn_Type)
  57. enum { NODE_ROOT = 500, NODE_FUNCTION, NODE_IDENT, NODE_FUNIDENT,
  58.        NODE_STRING, NODE_FORMATSTR, NODE_NUMBER, NODE_EXPRLIST,
  59.        NODE_FIRSTEXPR };
  60.  
  61. // the different function types (TreeNode->tn_Value.tnv_FundID if
  62. // TreeNode->tn_Type==NODE_FUNIDENT)
  63. enum { FUN_ABORT = 1, FUN_COMPLETE, FUN_COPYFILES, FUN_COPYLIB,
  64.        FUN_DEBUG, FUN_DELETE, FUN_EXECUTE, FUN_EXIT, FUN_FOREACH,
  65.        FUN_MAKEASSIGN, FUN_MAKEDIR, FUN_MESSAGE, FUN_ONERROR,
  66.        FUN_PROCEDURE, FUN_PROTECT, FUN_RENAME, FUN_REXX, FUN_RUN,
  67.        FUN_SET, FUN_STARTUP, FUN_TEXTFILE, FUN_TOOLTYPE, FUN_TRAP,
  68.        FUN_USER, FUN_WELCOME, FUN_WORKING, FUN_IF, FUN_UNTIL,
  69.        FUN_WHILE, FUN_EQU, FUN_NE, FUN_GT, FUN_GE, FUN_LT, FUN_LE,
  70.        FUN_ADD, FUN_SUB, FUN_MUL, FUN_DIV, FUN_AND, FUN_OR, FUN_XOR,
  71.        FUN_NOT, FUN_BITAND, FUN_BITOR, FUN_BITXOR, FUN_BITNOT,
  72.        FUN_SHIFTLEFT, FUN_SHIFTRIGHT, FUN_IN, FUN_ASKDIR, FUN_ASKFILE,
  73.        FUN_ASKSTRING, FUN_ASKNUMBER, FUN_ASKCHOICE, FUN_ASKOPTIONS,
  74.        FUN_ASKBOOL, FUN_ASKDISK, FUN_CAT, FUN_DATABASE, FUN_EXISTS,
  75.        FUN_EXPANDPATH, FUN_EARLIER, FUN_FILEONLY, FUN_GETASSIGN,
  76.        FUN_GETDEVICE, FUN_GETDISKSPACE, FUN_GETENV, FUN_GETSIZE,
  77.        FUN_GETSUM, FUN_GETVERSION, FUN_PATHONLY, FUN_PATMATCH, FUN_SELECT,
  78.        FUN_STRLEN, FUN_SUBSTR, FUN_TRANSCRIPT, FUN_TACKON, FUN_ALL,
  79.        FUN_APPEND, FUN_ASSIGNS, FUN_CHOICES, FUN_COMMAND, FUN_CONFIRM,
  80.        FUN_DEFAULT, FUN_DELOPTS, FUN_DEST, FUN_DISK, FUN_FILES, FUN_FONTS,
  81.        FUN_HELP, FUN_INCLUDE, FUN_INFOS, FUN_NEWNAME, FUN_NEWPATH,
  82.        FUN_NOGAUGE, FUN_NOPOSITION, FUN_NOREQ, FUN_OPTIONAL, FUN_PATTERN,
  83.        FUN_PROMPT, FUN_QUIET, FUN_RANGE, FUN_RESIDENT, FUN_SAFE,
  84.        FUN_SETDEFAULTTOOL, FUN_SETSTACK, FUN_SETTOOLTYPE, FUN_SOURCE,
  85.        FUN_SWAPCOLORS, FUN_SYMBOLSET, FUN_SYMBOLVAL, FUN_ICONINFO,
  86.        FUN_SETPOSITION, FUN_GETTOOLTYPE, FUN_GETDEFAULTTOOL, FUN_GETSTACK,
  87.        FUN_GETPOSITION, FUN_SIMULATE_ERROR, FUN_BEEP, FUN_COMPARE,
  88.        FUN_FINDBOARD, FUN_LET, FUN_REBOOT, FUN_DELAY, FUN_SWING, FUN_RANDOM,
  89.        FUN_PUT_PROPERTY, FUN_GET_PROPERTY, FUN_REMOVE_PROPERTY,
  90.        FUN_SAVE_PROPERTY_OBJECT, FUN_READ_PROPERTY_OBJECT, FUN_CAST_INT,
  91.        FUN_CAST_STRING, FUN_NOP, FUN_FLUSHLIBS,
  92.  
  93.        // new with v44 of the C= installer
  94.        FUN_EFFECT, FUN_SHOWMEDIA, FUN_SETMEDIA, FUN_CLOSEMEDIA, FUN_TRACE,
  95.        FUN_RETRACE, FUN_QUERYDISPLAY, FUN_BACK, FUN_OPENWBOBJECT,
  96.        FUN_SHOWWBOBJECT, FUN_CLOSEWBOBJECT, FUN_CURRENTDIR,
  97.  
  98.        FUN_SETENV };
  99.  
  100. // the symbol table is actually a hashtable; an entry
  101. // is a structure like this
  102. struct SymbolTableNode
  103. {
  104.   struct Node    sn_Node;
  105.   char           sn_Ident[32];
  106.   long           sn_Value;
  107.   int            sn_Type;
  108.   BOOL           sn_Constant;
  109.   BOOL           sn_LetLocal;
  110.   struct MinList sn_BindingStore;
  111.   struct MinList sn_Properties;
  112.   APTR           sn_UserData;
  113. };
  114.  
  115. #endif
  116.  
  117.  
  118.  
  119.